// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

//引入ElementUI组件
import ElementUI from 'element-ui'

//引入ElementUI-css
import 'element-ui/lib/theme-default/index.css'

//使用ElementUI
Vue.use(ElementUI)

require("es6-promise").polyfill();
//引入vueX
import Vuex from 'vuex'

//使用vuex
Vue.use(Vuex)

var store = new Vuex.Store({
	state: {
		token: sessionStorage.token
	},
	mutations: {
		update(token, tokens) {
			state.token = tokens;
		}
	}
})

//引入echarts组件
import echarts from 'echarts'

//使用echarts
Vue.prototype.$echarts = echarts 

import axios from './kits/axios.js';

Vue.use(axios);

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App }
})
